export default {
  changeName(state, name) {
    state.UserName = name
    try {
      localStorage.name = name
    } catch (e) { }
  },
  changeSchoolName(state, schoolName) {
    state.SchoolName = schoolName
    try {
      localStorage.schoolName = schoolName
    } catch (e) { }
  },
  changeArealName(state, areaName) {
    state.AreaName = areaName
    try {
      localStorage.areaName = areaName
    } catch (e) { }
  },
  setSuperuser(state, superuser) {
    state.is_superuser = superuser
    try {
      localStorage.superuser = superuser
    } catch (e) {}
  },
  setSeasoInfo(state, seasonInfo){
    state.seasonId = seasonInfo.seasonId
    state.seasonName = seasonInfo.seasonName
    state.seasonDate = seasonInfo.seasonDate
    try {
      localStorage.seasonId = seasonInfo.seasonId
      localStorage.seasonName = seasonInfo.seasonName
      localStorage.seasonDate = seasonInfo.seasonDate

    } catch (e) {console.log(e,'....') }
  }

}